<h2><?php echo t($content_type->getTitle()) ?></h2>

<nav>
	<a href="<?php echo url('AdminEditContentType', array('content_types_id' => $content_type->getContentTypesId())) ?>">
		<?php echo t('Edit the %0 content type', array(strtolower($content_type->getTitle()))) ?>
	</a>
</nav>

<form method="post" action="">

	<p>
		<label for="admin-contents-title"><?php echo t('Add a new %0', array(strtolower(preg_replace('/es$/', 'e', $content_type->getTitle())))) ?></label><br/>
		<input type="text" name="title" id="admin-contents-title" placeholder="<?php echo t('ie. "About us"') ?>"/> 
		<input type="hidden" name="content_types_id" value="<?php echo $content_type->getContentTypesId() ?>"/>
		<input type="hidden" name="add_content" value="1"/>
		<input type="submit" value="Go"/>
	</p>

</form>

<?php if ($contents) : ?>
	<ul>
		<?php foreach ($contents as $content) : ?>
			<li>
				<h3>
					<a href="<?php echo url('AdminEditContent', $content->asArray()) ?>">
						<?php echo htmlspecialchars($content->getTitle()) ?>
					</a>
				</h3>

				<p><?php echo htmlspecialchars(substr($content->getContents(), 0, 250)) ?>...</p>
			</li>
		<?php endforeach ?>
	</ul>
<?php else : ?>
	<p><?php echo t('You have not added any %0 yet.', array(strtolower($content_type->getTitle()))) ?></p>
<?php endif ?>
